home *** CD-ROM | disk | FTP | other *** search
/ Greenhouse Effect Detection Expriment / NASA Greenhouse Effect Detection Expriment 1992 - Disc 2.iso / software / dos / cdf22pc / src / tools / pickdelm.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-24  |  892 b   |  31 lines

  1. /******************************************************************************
  2. *
  3. *  NSSDC/CDF                    Pick a delimeter for a string.
  4. *
  5. *  Version 1.0, 25-Feb-92, Hughes STX
  6. *
  7. *  Modification history:
  8. *
  9. *   V1.0  25-Feb-92, J Love       Original version.
  10. *
  11. ******************************************************************************/
  12.  
  13. #include "cdfdist.h"
  14.  
  15. /******************************************************************************
  16. * PickDelim.    Exclamation mark (!) isn't used because it starts a comment in
  17. *        a skeleton table.
  18. ******************************************************************************/
  19.  
  20. char PickDelim (string)
  21. char *string;
  22. {
  23. static char choices[] = "\"'`^~.:-,;|+=@#$%&*()/?<>{}[]\\";
  24. int i;
  25.  
  26. for (i = 0; choices[i] != NUL; i++)
  27.    if (strchr(string,choices[i]) == NULL) return choices[i];
  28.  
  29. return NUL;    /* Very bad, use character stuffing if this is a problem. */
  30. }
  31.